package com.mls.fivedistrict.server.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.mls.fivedistrict.dao.NewsFlashMapper;
import com.mls.fivedistrict.pojo.NewsFlash;
import com.mls.fivedistrict.server.NewsFlashService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author chenhua
 * @date 2018/6/5 15:37
 */

@Service
public class NewsFlashServiceImpl extends ServiceImpl<NewsFlashMapper,NewsFlash> implements NewsFlashService {
    @Autowired
    NewsFlashMapper newsFlashMapper;
    @Transactional
    @Override
    public boolean addReadCount(Long id) {
        return newsFlashMapper.addReadCount(id);
    }
    @Transactional
    @Override
    public boolean addLikeCount(Long id) {
        return newsFlashMapper.addLikeCount(id);
    }
    @Transactional
    @Override
    public boolean addShareTimes(Long id) {
        return newsFlashMapper.addShareTimes(id);
    }

    @Transactional
    @Override
    public boolean cutReadCount(Long id) {
        return newsFlashMapper.cutReadCount(id);
    }
    @Transactional
    @Override
    public boolean cutLikeCount(Long id) {
        return newsFlashMapper.cutLikeCount(id);
    }
    @Transactional
    @Override
    public boolean cutShareTimes(Long id) {
        return newsFlashMapper.cutShareTimes(id);
    }

}
